function score = ModifiedWillsMetric(TrajObject,ObjectToCompare,AvDiam,AvArea,alpha,beta,ep)
%AvDiam;

%AvArea;
x1=TrajObject.Centroid(1);
y1=TrajObject.Centroid(2);
x2=ObjectToCompare.Centroid(1);
y2=ObjectToCompare.Centroid(2);
e1=TrajObject.Eccentricity;
e2=ObjectToCompare.Eccentricity;
a1=TrajObject.Area;
a2=ObjectToCompare.Area;

%alpha = 4;
%score = (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)+alpha*abs(a1-a2);
%score = (alpha/AvDiam^2)*((x1-x2)^2+(y1-y2)^2)+beta*(abs(a1-a2)/(0.5*(a1+a2))+ep*abs(e1-e2));
score = (alpha/AvDiam^2)*((x1-x2)^2+(y1-y2)^2)+beta*(abs(a1-a2)/(0.5*(a1+a2)));
